package com.my.hp_hr.dao;

import com.my.hp_hr.entity.Attendance;
import com.my.hp_hr.util.BaseDAO;

import java.util.List;

public class AttendanceDao extends BaseDAO {

    public List<Attendance> getAttendanceList() throws Exception {
        String sql = "select a.employee_number,a.day,a.time_type,a.start_type,a.start_time,a.end_time,a.end_type,a.work_type,a.notes,e.name from attendance a\n" +
                "            inner join employee e on a.employee_number = e.employee_number group by a.start_time;";
        List<Attendance> list = getList(sql, new Attendance());
        return list;
    }
}
